<?php


namespace app\user\controller;

use app\common\controller\User;

/**
 * 资金记录
 * Class Money
 * @package app\user\controller
 */
class Money extends User
{

    /**
     * @return mixed
     *
     * @throws \think\exception\DbException
     */
    public function index()
    {

        $type = [1, 2, 3, 6, 7, 8, 11];

        $list = model('UserMoneyLog')
            ->where(['uid' => $this->uid, 'type' => ['IN', $type]])
            ->order('id DESC')
            ->paginate(9, $this->isMobile() ? true : false, $this->request->param());

        $this->assign('list', $list);
        $this->assign('page', $list->render());
        return $this->fetch();
    }

}
